package com.freak.kotlinfitnessserver.app

import android.app.Application
import android.content.Context
import com.freak.kotlinfitnessserver.room.database.FitnessDeviceRoomDatabase

class App : Application() {
    companion object {
        lateinit var mApplication: Application
        fun getContext(): Context {
            return mApplication.applicationContext
        }
    }

    val fitnessDeviceDatabase: FitnessDeviceRoomDatabase by lazy {
        FitnessDeviceRoomDatabase.getDataBase(
            this
        )
    }

    override fun onCreate() {
        super.onCreate()
        mApplication = this
    }
}